/**
 * Created by aaronjin on 16/11/24.
 */

const resolve = require('path').resolve;

module.exports = function (env) {
    try {
        var _cdn = require('../conf/cdn.json');
        var _port = require('../conf/port.json');
        var output = {
            path: resolve(__dirname, '../dist'),
            filename: '[name].js',
            publicPath: (env.ver=='dev'?_cdn[env.ver]+':'+_port[env.project]:_cdn[env.ver])+'/',
            chunkFilename: '[name].chunk.js'
        };
        return output;
    } catch (e) {
        throw new Error(e);
    }

};

